t = ("hello", "python", "world")

# 根据索引访问元组
print(t[0])     # hello
print(t[2])     # world

t2 = t[0:3:2]   # 元组支持切片操作
print(t2)       # ('hello', 'world')

for item in t:
    print(item)

# for + range() + len()
for i in range(len(t)):
    print(i, t[i])

# 使用 enumerate()
for index, item in enumerate(t):
    print(index, "--->", item)

# 0 ---> hello
# 1 ---> python
# 2 ---> world

# 序号从11开始
for index, item in enumerate(t, start=11):
    print(index, "--->", item)

# 11 ---> hello
# 12 ---> python
# 13 ---> world


